const express = require('express')
const router = express.Router()
const { validate } = require('../middleware/validation')
const adminController = require('../controller/admin')
const { reg_userLogin, reg_updatePassword,  } = require('../validator/admin')


// 登录
router.post('/login', validate(reg_userLogin), adminController.login)
// 获取用户信息
router.get('/adminInfo', adminController.adminInfo)
// 退出登录
router.get('/logout', adminController.logout)
// 修改密码
router.post('/updatePassword', validate(reg_updatePassword), adminController.updatePassword)



module.exports = router
